const express = require('express');
const router = express.Router();

const talentService = require('../service/talentService')

// 表单验证
const expressJoi = require('@escook/express-joi')
const { talent_insert,talent_update } = require('../rule/talentRule')

router.get('', talentService.talent);

router.get('/byId', talentService.talentById);

router.post('/add', expressJoi(talent_insert), talentService.add);

router.post('/delete',talentService.delete);

router.post('/update',expressJoi(talent_update) ,talentService.update);


module.exports = router;
